import request from '@/utils/request'

export default {
  // GET http://localhost:8080/teacher/list
  // 获取教师列表
  getList() {
    // console.log(params)
    // console.log('调用了getlist==========')
    // GET http://localhost:8080/course?currentPage=1&size=2
    return request({
      url: '/teacher/list',
      method: 'get'
    })
  },
  // 添加 or 修改课程信息
  addCourse(data) {
    return request({
      url: '/course/edit',
      method: 'post',
      data
    })
  },
  // DELETE http://localhost:8080/course/8
  // 删除课程
  deleteCurse(id) {
    return request({
      url: '/course/' + id,
      method: 'delete'
    })
  },
  // GET http://localhost:8080/course/1
  // 查询指定id课程下的所有班级
  getCourseClass(params, id) {
    return request({
      url: '/course/' + id,
      method: 'get',
      params
    })
  }
}

